﻿<%@ Page Language="C#" AutoEventWireup="true" Codebehind="openprojectperview.aspx.cs"
    Inherits="LabMS.Web.OpenProject.openprojectperview" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>开放实验详情</title>
    <link type="text/css" rel="stylesheet" href="../style/screen.css" />
    <link href="../css/jquery.wysiwyg.css" rel="stylesheet" type="text/css" />
    <!--[if lte IE 6]>
    <link type="text/css" rel="stylesheet" href="../style/ie6.css" />
    <![endif]-->
    <!--[if lte IE 7]>
    <link type="text/css" rel="stylesheet" href="../style/ie7.css" />
    <![endif]-->
</head>
<body class="mainBody">
    <form id="form1" runat="server">
        <div class="main">
            <div id="pageInfo" class="clearfix">
                <div class="title">
                    <label>
                        <a href="currentopenprojectlist.aspx">本学期开放项目列表</a></label>&gt;查看实验开放项目申请
                </div>
            </div>
        </div>
        <div class="main">
            <p> 
            <% if (UserType == "teacher")
               {%>
                <asp:Button ID="btnApp" CssClass="button" runat="server" Text="申请" OnClick="btnApp_Click" />
                <asp:Button ID="btnCancelApp" CssClass="button" runat="server" Text="撤销申请" OnClick="btnApp_Click" />
             <%} %>
             <% if (UserType == "mana")
               {%>
                <asp:Button ID="tbnCheck" CssClass="button" runat="server" Text="审批[通过]" OnClick="btnApp_Click" />
                <asp:Button ID="tbnUnChek" CssClass="button" runat="server" Text="审批[不通过]" OnClick="btnApp_Click" />
                <%} %>
                 <% if (UserType == "teacher")
                    {%>
                <input id="btnEdit" class="button" type="button" runat="server" onclick="javascript:window.location.href='openprojectEdit.aspx?ID='+document.getElementById('tbID').value;"
                    value="修改" />
                   <%} %> 
                <asp:Button ID="btnDel" CssClass="button" runat="server" Text="删除" OnClick="Button2_Click" />
                <input id="btnReturn" class="button" type="button" onclick="javascript:if(document.getElementById('tbWhere').value=='1'){window.location.href='currentopenprojectlist.aspx';}if(document.getElementById('tbWhere').value=='0'){window.location.href='openprojectlist.aspx';};"
                    value="返回" />
            </p>
            <table border="0" cellpadding="4" cellspacing="0">
                <tr>
                    <td>
                        <label class="itemTitle">
                            实验名称:</label>
                    </td>
                    <td>
                        <asp:Label ID="tbProjectName" runat="server"></asp:Label>
                    </td>
                    <td>
                        <label class="itemTitle">
                            实验编号:</label>
                    </td>
                    <td>
                        <asp:Label ID="tbProjectCode" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            申请人:</label>
                    </td>
                    <td>
                        <asp:Label ID="lbAppPerson" runat="server" Text=""></asp:Label>
                    </td>
                    <td>
                        <label class="itemTitle">
                            申请时间:</label>
                    </td>
                    <td>
                        <asp:Label ID="lbAppDate" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            学期:</label>
                    </td>
                    <td>
                        <asp:Label ID="lbSTime" runat="server"></asp:Label>
                    </td>
                    <td>
                        <label class="itemTitle">
                            状态:
                        </label>
                    </td>
                    <td>
                        <asp:Label ID="lbStatus" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            实验室:</label></td>
                    <td>
                        <asp:DropDownList ID="ddlLabName" Enabled="false" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td>
                        <label class="itemTitle">
                            实验类别:</label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlProjectCategory" Enabled="false" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            实验类型:</label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlProjectType" Enabled="false" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td>
                        <label class="itemTitle">
                            实验所属学科:</label>
                    </td>
                    <td>
                        <asp:Label ID="tbProjectSubjectCode" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            实验要求:</label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlProjectRequire" Enabled="false" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td>
                        <label class="itemTitle">
                            实验者类别:</label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlProjectPartnerType" Enabled="false" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            面向专业:</label>
                    </td>
                    <td>
                        <asp:Label ID="tbOPProfessioanl" runat="server"></asp:Label>
                    </td>
                    <td>
                        <label class="itemTitle">
                            面向年级:</label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlOPGrade" Enabled="false" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            计划学时:</label>
                    </td>
                    <td>
                        <asp:Label ID="tbOPPlanningCourseTime" runat="server"></asp:Label>
                    </td>
                    <td>
                        <label class="itemTitle">
                            专项经费:</label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlOPFunds" Enabled="false" runat="server">
                            <asp:ListItem Text="--无--" Value="0"></asp:ListItem>
                            <asp:ListItem Text="--有--" Value="1"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
            </table>
            <table>
                <tr>
                    <td>
                        <label class="itemTitle">
                            实验项目来源:</label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlProjectComFrom" Enabled="false" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
            </table>
            <table>
                <tr>
                    <td>
                        <label class="itemTitle">
                            项目负责人:</label>
                    </td>
                    <td>
                        <asp:Label ID="tbOPInCharge" runat="server"></asp:Label>
                    </td>
                    <td>
                        <label class="itemTitle">
                            联系电话:</label>
                    </td>
                    <td>
                        <asp:Label ID="tbOPPhone" runat="server"></asp:Label>
                    </td>
                </tr>
            </table>
            <table>
                <tr>
                    <td>
                        <label class="itemTitle">
                            实验内容:</label>
                    </td>
                    <td>
                        <asp:Label ID="tbOPContent" runat="server"></asp:Label>
                    </td>
                </tr>
            </table>
            <table>
                <tr>
                    <td>
                        <label class="itemTitle">
                            实验周次:</label>
                    </td>
                    <td>
                        <asp:Label ID="tbProjectStartWeek" runat="server"></asp:Label>
                        --
                        <asp:Label ID="tbProjectEndWeek" runat="server"></asp:Label>
                    </td>
                    <td>
                        <label class="itemTitle">
                            指导老师:</label>
                    </td>
                    <td>
                        <asp:Label ID="tbTeacherCode" runat="server"></asp:Label>
                    </td>
                </tr>
            </table>
            <table>
                <tr>
                    <td valign="top">
                        <label class="itemTitle">
                            实验学生:</label>
                    </td>
                    <td>
                        <div id="studentlist" runat="server">
                            <asp:GridView ID="gv_studentList" runat="server" Width="300px" DataKeyNames="ID" AutoGenerateColumns="False"
                                CssClass="infoTable">
                                <Columns>
                                    <asp:BoundField DataField="Student_Code" HeaderText="学号" />
                                    <asp:BoundField DataField="Student_Name" HeaderText="学生姓名" />
                                </Columns>
                                <HeaderStyle CssClass="header" />
                                <RowStyle HorizontalAlign="Center" />
                                <EmptyDataTemplate>
                                    <a style="color: Red">无学生</a>
                                </EmptyDataTemplate>
                            </asp:GridView>
                        </div>
                    </td>
                </tr>
            </table>
            <table>
                <tr>
                    <td valign="top">
                        <label class="itemTitle">
                            申请说明:</label>
                    </td>
                    <td>
                        <asp:Label ID="tbOPReason" runat="server"></asp:Label>
                    </td>
                </tr>
            </table>
            <asp:Panel ID="panelExamine" Visible="false" runat="server">
                <table>
                    <tr>
                        <td valign="top">
                            <label class="itemTitle">
                                审核意见:</label>
                        </td>
                        <td>
                            <asp:Label ID="lbAuditOpinion" runat="server"></asp:Label>
                        </td>
                    </tr>
                </table>
                <table>
                    <tr>
                        <td>
                            <label class="itemTitle">
                                审核人:</label>
                        </td>
                        <td>
                            <asp:Label ID="lbOP_Approval" runat="server"></asp:Label>
                        </td>
                        <td>
                            <label class="itemTitle">
                                审核日期:</label>
                        </td>
                        <td>
                            <asp:Label ID="lbCheckTime" runat="server"></asp:Label>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <asp:Panel ID="paneltoCheck" Visible="false" runat="server">
                <table>
                    <tr>
                        <td valign="top">
                            <label class="itemTitle">
                                审核意见:</label>
                        </td>
                        <td>
                            <asp:TextBox ID="tbCheckContent" MaxLength="150" TextMode="MultiLine" runat="server"
                                Height="100px" Width="300"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <div>
            开放项目申请书
                <asp:GridView ID="Gv_File" runat="server" DataKeyNames="ID,Item_Address,Item_Name"  AutoGenerateColumns="false" OnRowCommand="Gv_File_RowCommand">
                    <Columns>
                        <asp:BoundField DataField="Item_Name" HeaderText="申请书名称"/>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                类型
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lb_Type" Text='<%# GetItemType(Eval("Item_Type")) %>' runat="server" />
                            </ItemTemplate>
                            
                        </asp:TemplateField>
                        <asp:ButtonField CommandName="DownLoad" Text="下载" />
                    </Columns>
                </asp:GridView> 
            </div>
        </div>
        <asp:Label ID="lbPageName" runat="server" Text="Label" Visible="false"></asp:Label>
        <asp:Label ID="lbCID" runat="server" Text="Label" Visible="false"></asp:Label>
        <asp:Label ID="lbErr" runat="server" ForeColor="Red" Text="Err" Visible="False"></asp:Label>
        <input id="tbID" style="display: none" type="text" runat="server" />
        <input id="tbCurrent" style="display: none" type="text" value="1" runat="server" />
        <input id="tbWhere" style="display: none" type="text" value="1" runat="server" />
    </form>
</body>
</html>
